<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>记录管理</title>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
    <link rel="stylesheet" href="http://cdn.static.runoob.com/libs/bootstrap/3.3.7/css/bootstrap.min.css">
    <link rel="stylesheet" href="../css/homepage.css">
    <script src="http://cdn.static.runoob.com/libs/jquery/2.1.1/jquery.min.js"></script>
    <script src="http://cdn.static.runoob.com/libs/bootstrap/3.3.7/js/bootstrap.min.js"></script>
</head>
<style>
    .searchbar{
        text-align: center;
    }
    .table-item{
        text-align: center;
    }
</style>
<body>
<div th:include="headbar::admin_headbar" style="margin-bottom:70px"></div>
<!--<div style="padding: 20px 550px 10px">-->


<div class="panel panel-default" style="width: 90%;margin-left: 5%">
    <div class="panel-heading">
        <h3 class="panel-title" style="text-align:center">记录列表</h3>
    </div>
    <div class="panel-body">
        <table class="table table-hover" style="text-align:center">
            <thead>
            <tr>
                <th class="table-item">订单号</th>
                <th class="table-item">借出时间</th>
                <th class="table-item">归还时间</th>
                <th class="table-item">租借车辆车型</th>
                <th class="table-item">租借者</th>
                <th class="table-item">手机号码</th>
                <th class="table-item">归还状态</th>
            </tr>
            </thead>
            <tbody>
            <tr  th:each="record: ${list}"  >
                <td th:text="${record.getBorrowRecordId()}" class="table-item"></td>
                <td th:text="${record.getBorrowDate()}" class="table-item"></td>
                <td th:text="${record.getReturnDate()}" class="table-item"></td>
                <td th:text="${record.getCarModel()}" class="table-item"></td>
                <td th:text="${record.getName()}" class="table-item"></td>
                <td th:text="${record.getPhone()}" class="table-item"></td>
                <td class="table-item" >
                    <!-- th:attr="carId=${car.carId}" //未还：0，已还：1-->
                    <button th:classappend="${record.getState() == 1 ? 'btn-success' : 'btn-info'}"
                            th:text="${record.getState() == 1 ? '已归还' :'未归还'}"
                            th:disabled="true">
                    </button>
                </td>
            </tr>
            </tbody>
        </table>
    </div>
</div>

</body>
</html>